home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / glibc108.zip / glibc108 / termios / termios.h < prev   
C/C++ Source or Header  |  1993-05-06  |  3KB  |  93 lines

  1. /* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3.  
  4. The GNU C Library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public License as
  6. published by the Free Software Foundation; either version 2 of the
  7. License, or (at your option) any later version.
  8.  
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12. Library General Public License for more details.
  13.  
  14. You should have received a copy of the GNU Library General Public
  15. License along with the GNU C Library; see the file COPYING.LIB.  If
  16. not, write to the, 1992 Free Software Foundation, Inc., 675 Mass Ave,
  17. Cambridge, MA 02139, USA.  */
  18.  
  19. /*
  20.  *    POSIX Standard: 7.1-2 General Terminal Interface    <termios.h>
  21.  */
  22.  
  23. #ifndef    _TERMIOS_H
  24.  
  25. #define    _TERMIOS_H    1
  26. #include <features.h>
  27.  
  28. __BEGIN_DECLS
  29.  
  30. /* Get the system-dependent definitions of `struct termios', `tcflag_t',
  31.    `cc_t', `speed_t', and all the macros specifying the flag bits.  */
  32. #include <termbits.h>
  33.  
  34. /* Return the output baud rate stored in *TERMIOS_P.  */
  35. extern speed_t cfgetospeed __P ((__const struct termios *__termios_p));
  36.  
  37. /* Return the input baud rate stored in *TERMIOS_P.  */
  38. extern speed_t cfgetispeed __P ((__const struct termios *__termios_p));
  39.  
  40. /* Set the output baud rate stored in *TERMIOS_P to SPEED.  */
  41. extern int cfsetospeed __P ((struct termios *__termios_p, speed_t __speed));
  42.  
  43. /* Set the input baud rate stored in *TERMIOS_P to SPEED.  */
  44. extern int cfsetispeed __P ((struct termios *__termios_p, speed_t __speed));
  45.  
  46. #ifdef    __USE_BSD
  47. /* Set both the input and output baud rates in *TERMIOS_OP to SPEED.  */
  48. extern void cfsetspeed __P ((struct termios *__termios_p, speed_t __speed));
  49. #endif
  50.  
  51.  
  52. /* Put the state of FD into *TERMIOS_P.  */
  53. extern int __tcgetattr __P ((int __fd, struct termios *__termios_p));
  54. extern int tcgetattr __P ((int __fd, struct termios *__termios_p));
  55.  
  56. #ifdef    __OPTIMIZE__
  57. #define    tcgetattr(fd, termios_p)    __tcgetattr((fd), (termios_p))
  58. #endif /* Optimizing.  */
  59.  
  60. /* Set the state of FD to *TERMIOS_P.
  61.    Values for OPTIONAL_ACTIONS (TCSA*) are in <termbits.h>.  */
  62. extern int tcsetattr __P ((int __fd, int __optional_actions,
  63.                __const struct termios *__termios_p));
  64.  
  65.  
  66. #ifdef    __USE_BSD
  67. /* Set *TERMIOS_P to indicate raw mode.  */
  68. extern void cfmakeraw __P ((struct termios *__termios_p));
  69. #endif
  70.  
  71. /* Send zero bits on FD.  */
  72. extern int tcsendbreak __P ((int __fd, int __duration));
  73.  
  74. /* Wait for pending output to be written on FD.  */
  75. extern int tcdrain __P ((int __fd));
  76.  
  77. /* Flush pending data on FD.
  78.    Values for QUEUE_SELECTOR (TC{I,O,IO}FLUSH) are in <termbits.h>.  */
  79. extern int tcflush __P ((int __fd, int __queue_selector));
  80.  
  81. /* Suspend or restart transmission on FD.
  82.    Values for ACTION (TC[IO]{OFF,ON}) are in <termbits.h>.  */
  83. extern int tcflow __P ((int __fd, int __action));
  84.  
  85.  
  86. #ifdef __USE_BSD
  87. #include <sys/ttydefaults.h>
  88. #endif
  89.  
  90. __END_DECLS
  91.  
  92. #endif /* termios.h  */
  93.